from django.conf.urls import re_path
from rest_framework.routers import DefaultRouter

from . import views

urlpatterns = [
    re_path(r'^channels/$', views.ChannelList.as_view()),
    re_path(r'^article/(?P<pk>\d+)/channel/$', views.ArticleList.as_view()),
    re_path(r'^article/$', views.ArticleCreate.as_view()),
    re_path(r'^article/(?P<pk>\d+)/collect/$', views.CollectedArticles.as_view()),
    re_path(r'^article/(?P<pk>\d+)/$', views.DetailArticle.as_view()),
    re_path(r'^article/(?P<pk>\d+)/publish_comment/$', views.Comment.as_view()),
    re_path(r'^articles/search/$', views.MySearchView.as_view()),

]

# router = DefaultRouter()
# router.register('articles/search', views.MySearchView, basename='')
# urlpatterns += router.urls